﻿using System;

namespace MECopter.Logging
{
    /// <summary>
    /// Basic logging class which writes debug stuff to the console
    /// </summary>
    static class Log
    {
        /// <summary>
        /// Log basic info
        /// </summary>
        /// <param name="obj"></param>
        public static void Info(object obj)
        {
            Console.ForegroundColor = ConsoleColor.White;
            Console.Write(System.DateTime.Now.ToLongTimeString());
            Console.Write(": ");
            Console.WriteLine(obj.ToString());
        }

        /// <summary>
        /// Log debugging data 
        /// </summary>
        /// <param name="obj"></param>
        public static void Debug(object obj)
        {
            Console.ForegroundColor = ConsoleColor.Green;
            Console.Write(System.DateTime.Now.ToLongTimeString());
            Console.Write(": ");
            Console.WriteLine(obj.ToString());
        }

        /// <summary>
        /// Log errors
        /// </summary>
        /// <param name="obj"></param>
        public static void Error(object obj)
        {
            Console.ForegroundColor = ConsoleColor.Red;
            Console.Write(System.DateTime.Now.ToLongTimeString());
            Console.Write(": ");
            Console.WriteLine(obj.ToString());
        }

    }
}
